using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;

using ILRuntime.CLR.TypeSystem;
using ILRuntime.CLR.Method;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;
using ILRuntime.Runtime.Stack;
using ILRuntime.Reflection;
using ILRuntime.CLR.Utils;

namespace ILRuntime.Runtime.Generated
{
    unsafe class CoreAnimation_CALayer_Binding
    {
        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
        {
            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
            MethodBase method;
            Type[] args;
            Type type = typeof(CoreAnimation.CALayer);
            args = new Type[]{typeof(System.nfloat)};
            method = type.GetMethod("set_CornerRadius", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, set_CornerRadius_0);
            args = new Type[]{typeof(System.nfloat)};
            method = type.GetMethod("set_BorderWidth", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, set_BorderWidth_1);
            args = new Type[]{typeof(CoreGraphics.CGColor)};
            method = type.GetMethod("set_BorderColor", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, set_BorderColor_2);
            args = new Type[]{typeof(System.Boolean)};
            method = type.GetMethod("set_MasksToBounds", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, set_MasksToBounds_3);


        }


        static StackObject* set_CornerRadius_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.nfloat @value = (System.nfloat)typeof(System.nfloat).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            CoreAnimation.CALayer instance_of_this_method = (CoreAnimation.CALayer)typeof(CoreAnimation.CALayer).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.CornerRadius = value;

            return __ret;
        }

        static StackObject* set_BorderWidth_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.nfloat @value = (System.nfloat)typeof(System.nfloat).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            CoreAnimation.CALayer instance_of_this_method = (CoreAnimation.CALayer)typeof(CoreAnimation.CALayer).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.BorderWidth = value;

            return __ret;
        }

        static StackObject* set_BorderColor_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            CoreGraphics.CGColor @value = (CoreGraphics.CGColor)typeof(CoreGraphics.CGColor).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            CoreAnimation.CALayer instance_of_this_method = (CoreAnimation.CALayer)typeof(CoreAnimation.CALayer).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.BorderColor = value;

            return __ret;
        }

        static StackObject* set_MasksToBounds_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Boolean @value = ptr_of_this_method->Value == 1;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            CoreAnimation.CALayer instance_of_this_method = (CoreAnimation.CALayer)typeof(CoreAnimation.CALayer).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.MasksToBounds = value;

            return __ret;
        }



    }
}
